home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Games 1996 July
/
Amiga Games 1996 #7.iso
/
userbox
/
publicdomain
/
hdenv
/
install-hdenv
< prev
next >
Wrap
Text File
|
1996-04-10
|
6KB
|
159 lines
; $VER: Install-HDEnv 1.0 (10.4.96)
; Copyright (C) 1996 by Michael Fedrowitz
;
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
;
(set ver (/ (getversion) 65536))
(if (< ver 37)
(abort "You need at least OS 2.04 to use HDEnv.")
)
(if (exists "C:HDEnv")
(set upd 1)
(set upd 0)
)
(set upd
(askchoice
(prompt "Do you wish to")
(help "If you have never used HDEnv before select 'install from scratch', "
"if you are updating from HDEnv 1.1.3 or later select 'update'.\n"
"If you're updating from an earlier version you will have to "
"install it manually, sorry.\n"
"Please refer to HDEnv.guide (chapter 'Updating') for further "
"information.")
(choices "install HDEnv from scratch, or"
"update an old HDEnv installation?")
(default upd)
)
)
(if (< ver 39)
(set exe 0)
(set exe 1)
)
(if (> @user-level 1)
(set exe
(askchoice
(prompt "Please select executable to install.")
(help "The two executables are functionally completely identical.\n"
"HDEnv will work with any OS version from 2.04 (V37) up.\n"
"HDEnv.v39 is a few hundred bytes shorter than HDEnv, but "
"will only work with OS 3.0 (V39) or higher.")
(choices "HDEnv" "HDEnv.v39")
(default exe)
)
)
)
(if (= exe 0)
(copyfiles
(prompt "Copying executable to C:.")
(help @copyfiles-help)
(source "HDEnv")
(dest "C:")
(confirm)
)
(copyfiles
(prompt "Copying executable to C:.")
(help @copyfiles-help)
(source "HDEnv.v39")
(dest "C:")
(newname "HDEnv")
(confirm)
)
)
(if (= upd 0)
(
(set env
(askdir
(prompt "Please select your new Env directory.")
(help @askdir-help)
(default "SYS:Env")
(newpath)
)
)
(if (NOT (exists env))
(makedir env)
)
(if (askbool
(prompt "Move ENV: to new Env directory?")
(help "This will copy the contents of your old ENV: directory "
"to its new place, update the assign and delete the old "
"directory.")
(default 1)
)
(
(copyfiles
(prompt "Copying ENV: to new Env directory.")
(source "ENV:")
(dest env)
(all)
)
(set old (getassign "ENV"))
(makeassign "ENV" env)
(run (cat "Delete \"" old "\" ALL QUIET"))
)
)
(if (askbool
(prompt "Should I try to build a new Startup-sequence?\n"
"(A backup of you old Startup-sequence will be created.)")
(help "A number of modifications need to be made to your "
"Startup-sequence for HDEnv to take effect.\n"
"This will try to do these modifications automatically, "
"what may fail if you have a non-standard Startup-sequence.")
(default 1)
)
(
(run (cat "rx Install-HDEnv.rexx \"" env "\"")
(prompt "Trying to build new Startup-sequence.")
(safe)
)
(if (exists "T:Startup-sequence")
(
(copyfiles
(prompt "Making backup of old Startup-sequence")
(help @copyfiles-help)
(source "S:Startup-sequence")
(dest "S:")
(newnam "Startup-sequence.bak")
(confirm)
)
(copyfiles
(prompt "Copying new Startup-sequence to S:.")
(help @copyfiles-help)
(source "T:Startup-sequence")
(dest "S:")
(confirm)
)
(delete "T:Startup-sequence")
(message "Successfully built new Startup-sequence.\n"
"If you have a non-standard Startup-sequence "
"you should check if the new one is correct.\n"
"A backup of your old Startup-sequence can "
"be found in S:Startup-sequence.bak")
)
(message "Couldn't build new Startup-sequence.\n"
"Please refer to HDEnv.guide (chapter 'Installation').")
)
)
)
)
)